<?php
class CharbaseModel extends Model {
	protected $fields = array(
		'cid',
		'uid',
		'name',
		'chenghao',
		'chuohao',
		'sex',
		'age',
		'hp',
		'mp',
		'nowhp',
		'nowmp',
		'huoli',
		'level',
		'jingyan',
		'shuxingdian',
		'liliang',
		'minjie',
		'zhili',
		'qiangzhuang',
		'meili',
		'dongcha',
		'borntime',
		'lastlogin',
		'money',
		'bankmoney',
		'zhuangbei1',
		'zhuangbei2',
		'zhuangbei3',
		'zhuangbei4',
		'zhuangbei5',
		'zhuangbei6',
		'zhuangbei7',
		'zhuangbei8',
		'zhuangbei9',
		'zhuangbei10',
		'_pk' => 'cid',
		'_autoInc' => true,
	);

    protected $_validate = array(
    	array('name','require','角色名必须！',1),
    	array('name','','角色名重复！',0,'unique','add'),
    );

    protected $_auto = array(
		array('borntime','time','add','function'),
		array('lastlogin','time','add','function'),
		array('lastlogin','time','save','function'),
		array('zhuangbei1','0','add'),
		array('zhuangbei2','0','add'),
		array('zhuangbei3','0','add'),
		array('zhuangbei4','0','add'),
		array('zhuangbei5','0','add'),
		array('zhuangbei6','0','add'),
		array('zhuangbei7','0','add'),
		array('zhuangbei8','0','add'),
		array('zhuangbei9','0','add'),
		array('zhuangbei10','0','add'),
		array('hp','98','add'),
		array('mp','99','add'),
		array('nowhp','98','add'),
		array('nowmp','99','add'),
		array('huoli','100','add'),
		array('money','10000','add'),
		array('jingyan','900000000','add'),
		array('shuxingdian','0','add'),
		);
}
?>